package model;

public class Model {
	
	Tracker tracker;
	
	public Model(){
		Factory factory = new Factory();
		tracker = factory.getSystem();		
	}
	
	public void update(){
		tracker.update();
	}
	
	public String getStatusString(){
		return tracker.getStatusString();
	}
	
	public void addNewNode(double maxDownBandwidth, double maxUpBandwidth, boolean leecher, boolean seeder, double shareRatioGoal){
		tracker.addNode(new Node(tracker, tracker.getFile(), maxDownBandwidth, maxUpBandwidth, leecher, seeder, shareRatioGoal));
	}
	
	public void removeNode(int nodeNumber){
		tracker.removeNode(nodeNumber);
	}

}
